Full-Stack React, TypeScript, and Node by David Choi

Full-Stack React, TypeScript, and Node by David Choi

Author:David Choi
Language: eng
Format: epub, mobi
Publisher: Packt Publishing Pvt. Ltd.
Published: 2020-12-18T00:00:00+00:00


Figure 8.25 – Middleware for route /a

Great, that worked, but now try using your browser to go to http://localhost:8000/c. Does that work? No, it does not, and you get the Cannot GET /c message. As you might have guessed, browser calls are defaulted to GET calls but our /c route is a POST-only route. If you bring up your terminal and run the last POST curl command that we used in the Learning Node's capabilities section, you'll see this:

Figure 8.26 – Route /c

As you can see, we receive the appropriate text message.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.